package net.wanho.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * Author：汤小洋
 * Date：2025-06-13 15:23
 * Description：<描述>
 */
@WebFilter("/hello")
public class HelloFilter implements Filter {

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("在调用目标资源之前进行拦截处理。。。。。。。。。。。。。。。");

        filterChain.doFilter(servletRequest, servletResponse); // 放行

        System.out.println("在调用目标资源之后进行拦截处理。。。。。。。。。。。。。。。");
    }
}
